package Lee_code;

/**
 * @author blh
 * @date 2024年07月17日 20:07
 */
public class Lee_162_717 {
    public int findPeakElement(int[] nums) {
        int len = nums.length;
        int right = len - 1;
        int left = 0;
        while (right > left) {
            int mid = right + (left - right) / 2;
            if (mid < right && nums[mid] < nums[mid + 1]) {
                left = mid++;
            } else {
                right = mid;
            }
        }
        return left;
    }
}
